function upload() {
    $('[type=file]').eq(0).click();
    document.getElementById('ExcelTemplate').onchange = function () {

        // alert('111')
        var excel = document.getElementById('ExcelTemplate').files[0]
        console.log(excel.name.split('.')[1])
        if (excel.name.split('.')[1] == 'xls') {
            document.getElementById('uploadForm').submit()
            setTimeout(function(){
                window.location.href = "/admin/addTeacher"
            },2500)
        } else {
            alert('上传模板文件有误，请阅读导入模板注意事项')
        }
    }
}

